//用户管理
function value_u(id) {
    $("#userid_h").val(id)
}
function submitModify() {

    if (!confirm("确认修改？")) {
        window.event.returnValue = false;
    }  else {
        //获得radio的值
        var radionum = document.getElementById("statuslist").UStatus;
        for (var i = 0; i < radionum.length; i++) {
            if (radionum[i].checked) {
                st = radionum[i].value;
            }
        }
        var uid= $("#userid_h").val();
        window.location.href = 'ModifyUserStatus?userid=' + uid + '&status=' + st;

    }
}
//删除用户
function delete_u(id) {
    if(!confirm("确定删除该用户？")){
        window.event.returnValue=false;
    }else{

        window.location.href = 'DeleteUser?userid='+id;
    }
}

//商品管理
function value_g(id,name,price,show) {
    $("#gid").val(id);
    $('#name').val(name);
    $('#price').val(price);
    $('#show_option').val(show);
}
function goodsModify() {


    if (!confirm("确认修改？")) {
        window.event.returnValue = false;
    }  else {

        var gid = $("#gid").val();
        var name =  $('#name').val();
        var price =   $('#price').val();
        var show =  $('#show_option').val();

        $('test').val(gid+name+price+show);

        window.location.href = 'ModifyGoodsInfo?gid=' + gid + '&name=' + name
            + '&price=' + price + '&show=' + show;

    }
}

function delete_g(gid) {
    if(!confirm("确定删除该商品？")){
        window.event.returnValue=false;
    }else{

        window.location.href = 'DeleteGoods?gid='+gid;
    }
}

//商品显示
function delete_show(gid) {
    if(!confirm("确定不显示该商品？")){
        window.event.returnValue=false;
    }else{
        window.location.href = 'DeleteShow?gid='+gid;
    }
}

/**
 * 分类管理
 * @param id
 */
function value_t(id,name) {
    $("#typeid_t").val(id);
    $("#type_name").val(name);
}

function modify_type(tid) {
    if(!confirm("确定修改？")){
        window.event.returnValue=false;
    }else{
        var tid = $("#typeid_t").val();
        var name =  $("#type_name").val();
        window.location.href = 'Modify_type?tid='+tid+'&type_name='+name;
    }
}

